﻿using BP.Plugin.Monitor.Domain.Entities;
using Finbuckle.MultiTenant;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace BP.Plugin.Monitor.Infrastructure.Persistence.Configurations;

public class OnlineUserConfiguration : IEntityTypeConfiguration<OnlineUser>
{
    public void Configure(EntityTypeBuilder<OnlineUser> builder)
    {
        builder
            .ToTable("OnlineUsers", SchemaNames.Monitor)
            .IsMultiTenant();

        builder.HasKey(a => a.Id);
    }
}
